Optimal. Leaf size=127 \[ -\frac {x}{b}+\frac {\sqrt [4]{a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a}-\sqrt {b}} \tanh (c+d x)}{\sqrt [4]{a}}\right )}{2 \sqrt {\sqrt {a}-\sqrt {b}} b d}+\frac {\sqrt [4]{a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a}+\sqrt {b}} \tanh (c+d x)}{\sqrt [4]{a}}\right )}{2 \sqrt {\sqrt {a}+\sqrt {b}} b d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 127, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {3296, 1301,
213, 1180, 214} \begin {gather*} \frac {\sqrt [4]{a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a}-\sqrt {b}} \tanh (c+d x)}{\sqrt [4]{a}}\right )}{2 b d \sqrt {\sqrt {a}-\sqrt {b}}}+\frac {\sqrt [4]{a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a}+\sqrt {b}} \tanh (c+d x)}{\sqrt [4]{a}}\right )}{2 b d \sqrt {\sqrt {a}+\sqrt {b}}}-\frac {x}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 214
Rule 1180
Rule 1301
Rule 3296
Rubi steps
\begin {align*} \int \frac {\sinh ^4(c+d x)}{a-b \sinh ^4(c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {x^4}{\left (1-x^2\right ) \left (a-2 a x^2+(a-b) x^4\right )} \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {1}{b \left (-1+x^2\right )}+\frac {a \left (1-x^2\right )}{b \left (a-2 a x^2+(a-b) x^4\right )}\right ) \, dx,x,\tanh (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\tanh (c+d x)\right )}{b d}+\frac {a \text {Subst}\left (\int \frac {1-x^2}{a-2 a x^2+(a-b) x^4} \, dx,x,\tanh (c+d x)\right )}{b d}\\ &=-\frac {x}{b}-\frac {\left (\sqrt {a} \left (\sqrt {a}+\sqrt {b}\right )\right ) \text {Subst}\left (\int \frac {1}{-a-\sqrt {a} \sqrt {b}+(a-b) x^2} \, dx,x,\tanh (c+d x)\right )}{2 b d}-\frac {\left (a \left (1-\frac {\sqrt {b}}{\sqrt {a}}\right )\right ) \text {Subst}\left (\int \frac {1}{-a+\sqrt {a} \sqrt {b}+(a-b) x^2} \, dx,x,\tanh (c+d x)\right )}{2 b d}\\ &=-\frac {x}{b}+\frac {\sqrt [4]{a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a}-\sqrt {b}} \tanh (c+d x)}{\sqrt [4]{a}}\right )}{2 \sqrt {\sqrt {a}-\sqrt {b}} b d}+\frac {\sqrt [4]{a} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a}+\sqrt {b}} \tanh (c+d x)}{\sqrt [4]{a}}\right )}{2 \sqrt {\sqrt {a}+\sqrt {b}} b d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.33, size = 143, normalized size = 1.13 \begin {gather*} \frac {-2 (c+d x)-\frac {\sqrt {a} \text {ArcTan}\left (\frac {\left (\sqrt {a}-\sqrt {b}\right ) \tanh (c+d x)}{\sqrt {-a+\sqrt {a} \sqrt {b}}}\right )}{\sqrt {-a+\sqrt {a} \sqrt {b}}}+\frac {\sqrt {a} \tanh ^{-1}\left (\frac {\left (\sqrt {a}+\sqrt {b}\right ) \tanh (c+d x)}{\sqrt {a+\sqrt {a} \sqrt {b}}}\right )}{\sqrt {a+\sqrt {a} \sqrt {b}}}}{2 b d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 1.52, size = 139, normalized size = 1.09
method | result | size |
risch | \(-\frac {x}{b}+\left (\munderset {\textit {\_R} =\RootOf \left (\left (256 a \,b^{4} d^{4}-256 b^{5} d^{4}\right ) \textit {\_Z}^{4}-32 a \,b^{2} d^{2} \textit {\_Z}^{2}+a \right )}{\sum }\textit {\_R} \ln \left ({\mathrm e}^{2 d x +2 c}+\left (-128 a \,b^{2} d^{3}+128 b^{3} d^{3}\right ) \textit {\_R}^{3}+\left (32 a \,d^{2} b -32 b^{2} d^{2}\right ) \textit {\_R}^{2}+\left (8 a d +8 b d \right ) \textit {\_R} -\frac {2 a}{b}-1\right )\right )\) | \(121\) |
derivativedivides | \(\frac {-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b}-\frac {a \left (\munderset {\textit {\_R} =\RootOf \left (a \,\textit {\_Z}^{8}-4 a \,\textit {\_Z}^{6}+\left (6 a -16 b \right ) \textit {\_Z}^{4}-4 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\left (\textit {\_R}^{6}-3 \textit {\_R}^{4}+3 \textit {\_R}^{2}-1\right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{7} a -3 \textit {\_R}^{5} a +3 \textit {\_R}^{3} a -8 \textit {\_R}^{3} b -\textit {\_R} a}\right )}{4 b}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}}{d}\) | \(139\) |
default | \(\frac {-\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b}-\frac {a \left (\munderset {\textit {\_R} =\RootOf \left (a \,\textit {\_Z}^{8}-4 a \,\textit {\_Z}^{6}+\left (6 a -16 b \right ) \textit {\_Z}^{4}-4 a \,\textit {\_Z}^{2}+a \right )}{\sum }\frac {\left (\textit {\_R}^{6}-3 \textit {\_R}^{4}+3 \textit {\_R}^{2}-1\right ) \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-\textit {\_R} \right )}{\textit {\_R}^{7} a -3 \textit {\_R}^{5} a +3 \textit {\_R}^{3} a -8 \textit {\_R}^{3} b -\textit {\_R} a}\right )}{4 b}+\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b}}{d}\) | \(139\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1009 vs.
\(2 (91) = 182\).
time = 0.42, size = 1009, normalized size = 7.94 \begin {gather*} -\frac {b \sqrt {\frac {{\left (a b^{2} - b^{3}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + a}{{\left (a b^{2} - b^{3}\right )} d^{2}}} \log \left (2 \, {\left (a b - b^{2}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + \cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2} + 2 \, {\left ({\left (a b^{2} - b^{3}\right )} d^{3} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} - b d\right )} \sqrt {\frac {{\left (a b^{2} - b^{3}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + a}{{\left (a b^{2} - b^{3}\right )} d^{2}}} - 1\right ) - b \sqrt {\frac {{\left (a b^{2} - b^{3}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + a}{{\left (a b^{2} - b^{3}\right )} d^{2}}} \log \left (2 \, {\left (a b - b^{2}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + \cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2} - 2 \, {\left ({\left (a b^{2} - b^{3}\right )} d^{3} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} - b d\right )} \sqrt {\frac {{\left (a b^{2} - b^{3}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + a}{{\left (a b^{2} - b^{3}\right )} d^{2}}} - 1\right ) - b \sqrt {-\frac {{\left (a b^{2} - b^{3}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} - a}{{\left (a b^{2} - b^{3}\right )} d^{2}}} \log \left (-2 \, {\left (a b - b^{2}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + \cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2} + 2 \, {\left ({\left (a b^{2} - b^{3}\right )} d^{3} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + b d\right )} \sqrt {-\frac {{\left (a b^{2} - b^{3}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} - a}{{\left (a b^{2} - b^{3}\right )} d^{2}}} - 1\right ) + b \sqrt {-\frac {{\left (a b^{2} - b^{3}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} - a}{{\left (a b^{2} - b^{3}\right )} d^{2}}} \log \left (-2 \, {\left (a b - b^{2}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + \cosh \left (d x + c\right )^{2} + 2 \, \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + \sinh \left (d x + c\right )^{2} - 2 \, {\left ({\left (a b^{2} - b^{3}\right )} d^{3} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} + b d\right )} \sqrt {-\frac {{\left (a b^{2} - b^{3}\right )} d^{2} \sqrt {\frac {a}{{\left (a^{2} b^{3} - 2 \, a b^{4} + b^{5}\right )} d^{4}}} - a}{{\left (a b^{2} - b^{3}\right )} d^{2}}} - 1\right ) + 4 \, x}{4 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.58, size = 13, normalized size = 0.10 \begin {gather*} -\frac {d x + c}{b d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.05, size = 1861, normalized size = 14.65 \begin {gather*} \ln \left (\frac {\left (\frac {\left (\frac {524288\,a^3\,d^2\,\left (31\,a\,b^2-128\,a^2\,b+128\,a^3-b^3+256\,a^3\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^3\,{\mathrm {e}}^{2\,c+2\,d\,x}+21\,a\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-240\,a^2\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^8\,\left (a-b\right )}+\frac {1048576\,a^3\,d^3\,\sqrt {\frac {a\,b^2-\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}\,\left (45\,a\,b^2-104\,a^2\,b+64\,a^3-3\,b^3+4\,b^3\,{\mathrm {e}}^{2\,c+2\,d\,x}-50\,a\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+48\,a^2\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^7\,\left (a-b\right )}\right )\,\sqrt {\frac {a\,b^2-\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}}{4}+\frac {262144\,a^4\,d\,\left (72\,a\,b-64\,a^2-9\,b^2+256\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+31\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-288\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^9\,\left (a-b\right )}\right )\,\sqrt {\frac {a\,b^2-\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}}{4}+\frac {32768\,a^4\,\left (128\,a\,b-128\,a^2-15\,b^2+256\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+29\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-304\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{10}\,\left (a-b\right )}\right )\,\sqrt {-\frac {a\,b^2-\sqrt {a\,b^5}}{16\,\left (b^5\,d^2-a\,b^4\,d^2\right )}}-\ln \left (\frac {\left (\frac {\left (\frac {524288\,a^3\,d^2\,\left (31\,a\,b^2-128\,a^2\,b+128\,a^3-b^3+256\,a^3\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^3\,{\mathrm {e}}^{2\,c+2\,d\,x}+21\,a\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-240\,a^2\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^8\,\left (a-b\right )}-\frac {1048576\,a^3\,d^3\,\sqrt {\frac {a\,b^2-\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}\,\left (45\,a\,b^2-104\,a^2\,b+64\,a^3-3\,b^3+4\,b^3\,{\mathrm {e}}^{2\,c+2\,d\,x}-50\,a\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+48\,a^2\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^7\,\left (a-b\right )}\right )\,\sqrt {\frac {a\,b^2-\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}}{4}-\frac {262144\,a^4\,d\,\left (72\,a\,b-64\,a^2-9\,b^2+256\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+31\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-288\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^9\,\left (a-b\right )}\right )\,\sqrt {\frac {a\,b^2-\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}}{4}+\frac {32768\,a^4\,\left (128\,a\,b-128\,a^2-15\,b^2+256\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+29\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-304\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{10}\,\left (a-b\right )}\right )\,\sqrt {-\frac {a\,b^2-\sqrt {a\,b^5}}{16\,\left (b^5\,d^2-a\,b^4\,d^2\right )}}-\frac {x}{b}-\ln \left (\frac {\left (\frac {\left (\frac {524288\,a^3\,d^2\,\left (31\,a\,b^2-128\,a^2\,b+128\,a^3-b^3+256\,a^3\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^3\,{\mathrm {e}}^{2\,c+2\,d\,x}+21\,a\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-240\,a^2\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^8\,\left (a-b\right )}-\frac {1048576\,a^3\,d^3\,\sqrt {\frac {a\,b^2+\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}\,\left (45\,a\,b^2-104\,a^2\,b+64\,a^3-3\,b^3+4\,b^3\,{\mathrm {e}}^{2\,c+2\,d\,x}-50\,a\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+48\,a^2\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^7\,\left (a-b\right )}\right )\,\sqrt {\frac {a\,b^2+\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}}{4}-\frac {262144\,a^4\,d\,\left (72\,a\,b-64\,a^2-9\,b^2+256\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+31\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-288\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^9\,\left (a-b\right )}\right )\,\sqrt {\frac {a\,b^2+\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}}{4}+\frac {32768\,a^4\,\left (128\,a\,b-128\,a^2-15\,b^2+256\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+29\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-304\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{10}\,\left (a-b\right )}\right )\,\sqrt {-\frac {a\,b^2+\sqrt {a\,b^5}}{16\,\left (b^5\,d^2-a\,b^4\,d^2\right )}}+\ln \left (\frac {\left (\frac {\left (\frac {524288\,a^3\,d^2\,\left (31\,a\,b^2-128\,a^2\,b+128\,a^3-b^3+256\,a^3\,{\mathrm {e}}^{2\,c+2\,d\,x}+b^3\,{\mathrm {e}}^{2\,c+2\,d\,x}+21\,a\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-240\,a^2\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^8\,\left (a-b\right )}+\frac {1048576\,a^3\,d^3\,\sqrt {\frac {a\,b^2+\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}\,\left (45\,a\,b^2-104\,a^2\,b+64\,a^3-3\,b^3+4\,b^3\,{\mathrm {e}}^{2\,c+2\,d\,x}-50\,a\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+48\,a^2\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^7\,\left (a-b\right )}\right )\,\sqrt {\frac {a\,b^2+\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}}{4}+\frac {262144\,a^4\,d\,\left (72\,a\,b-64\,a^2-9\,b^2+256\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+31\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-288\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^9\,\left (a-b\right )}\right )\,\sqrt {\frac {a\,b^2+\sqrt {a\,b^5}}{b^4\,d^2\,\left (a-b\right )}}}{4}+\frac {32768\,a^4\,\left (128\,a\,b-128\,a^2-15\,b^2+256\,a^2\,{\mathrm {e}}^{2\,c+2\,d\,x}+29\,b^2\,{\mathrm {e}}^{2\,c+2\,d\,x}-304\,a\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{b^{10}\,\left (a-b\right )}\right )\,\sqrt {-\frac {a\,b^2+\sqrt {a\,b^5}}{16\,\left (b^5\,d^2-a\,b^4\,d^2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________